<?php
    $menu_1 = '';
    $menu_2 = '';
    $menu_3 = '';
    $menu_4 = '';
    $menu_5 = ' class="active"';
    $menu_6 = '';
    $menu_7 = '';
    $menu_8 = '';
    include('header.php');
    
    $sql = "SELECT * FROM standard_shape WHERE ss_active=1 ORDER BY ss_code";
    $result = $db->Execute($sql);
    $i = 1;
    $packing_list = '';
    while (!$result->EOF)
    {
        if(img_exists(APPPATH.'/images/standard-shape/'.$result->fields['ss_id'],$result->fields['ss_img'])){
            $img = '<img src="'.SITEURL.'/images/standard-shape/'.$result->fields['ss_id'].'/'.$result->fields['ss_img'].'" class="standard_shape_img" />';
        }else{
            $img = '<img src="'.SITEURL.'/images/standard-shape/no_img.jpg" class="standard_shape_img" />';
        }
	
	if($result->fields['ss_volume']!=''){
	    $pdetail1 = 'Volume : '.$result->fields['ss_volume'];
	}else if($result->fields['ss_width']!=''){
	    $pdetail1 = 'Width : '.$result->fields['ss_width'];
	}else{
	    $pdetail1 = '';
	}
	
	if($result->fields['ss_diamater']!=''){
	    $pdetail2 = 'Diamater : '.$result->fields['ss_diamater'];
	}else if($result->fields['ss_lenght']!=''){
	    $pdetail2 = 'Lenght : '.$result->fields['ss_lenght'];
	}else{
	    $pdetail2 = '';
	}
	
	$packing_list .= <<<packing_list
	    <div class="shape_list">
		<div class="shape_list_box">
		    <div class="shape_list_img">
			{$img}
			<div class="shape_list_code">
			    {$result->fields['ss_code']}
			</div>
		    </div>
		    <div class="shape_list_name">
			{$result->fields['ss_name']}
		    </div>
		</div>
		<p>{$pdetail1}</p>
		<p class="diamater">{$pdetail2}</p>
		<p>Height : {$result->fields['ss_height']}</p>
	    </div>
packing_list;
        
        $result->MoveNext();
    }
    $result->Close();
?>
	    <div id="main_content">
		
		<div class="page_title" id="shap_title">
		    <img src="images/shape_title.jpg" alt="Fact &amp; Size" />
		</div>
		
		<div id="shap_content_left">
		    <ul>
			<li><a href="standard-shape.php" title="Standard Shape" class="current">-&nbsp;&nbsp;Standard Shape</a></li>
			<li><a href="custom-made-shape.php" title="Custom Made Shape">-&nbsp;&nbsp;Custom Made Shape</a></li>
			<li><a href="limitation-on-shape-forming.php" title="Limitation On Shape Forming">-&nbsp;&nbsp;Limitation On Shape Forming</a></li>
		    </ul>
		</div>
		
		<div id="shap_content_right">
		    <div id="shap_content_title">Standard Shape</div>
		    <div id="custom_shap_content_right">
			<?php echo $packing_list; ?>
			<div class="clear">&nbsp;</div>
		    </div>
		</div>
		<div class="clear">&nbsp;</div>
	    </div>
<?php
    include('footer.php');
?>